<template>
	<view
		style="width: 100%;height: 100vh;position: fixed;top: 0;left: 0;z-index: 100001;background-color: rgba(0, 0, 0, 0.2);"
		v-show="isShowActi" @click="closePopActi()">
		<view style="width: 100%;height: 500rpx;display: grid;place-items: center;margin-top: calc(50vh - 400rpx);"
			@longpress="handleLongPress()">
			<image :src="pic" style="width: 460rpx;" mode="widthFix"></image>
			<image :src="closeImg" style="width: 60rpx;height: 60rpx;;margin-top: 20rpx;" lazy-load
				@click="closePopActi()">
			</image>
		</view>
	</view>
</template>

<script>
	import animationType from '@/utils/animationType.js'
	export default {
		props: {
			//数据源
			isShow: {
				type: Boolean,
				default: false
			},
		},
		data() {
			return {
				pic: 'https://pic.mae.vip/o_1igdrpg651it31rob1ebe11qpdqvg.jpg',
				isShowActi: false,
				closeImg: 'https://pic.mae.vip//crmebimage/public/maintain/2024/09/10/71f1a9aba07d46fdb88b81562904236fwes70ule49.png',
			}
		},
		mounted() {
			let that = this;
		},
		onLoad(options) {
			let that = this;
		},
		onShow() {
			let that = this;
			//that.isShowActi = that.isShow;
		},
		methods: {
			handleLongPress() {
				let that = this;

				let platform = uni.getSystemInfoSync().platform; //手机类型
				console.log(platform);
				if (platform == 'ios') {
					window.webkit.messageHandlers.openCode.postMessage();
				} else {
					//window.android.goWechat('goWechat');
					window.location.href = 'goWechat';
				}
			},
			open() {
				this.isShowActi = true;
			},
			closePopActi() {
				this.isShowActi = false;
			},
		},
	}
</script>

<style lang="scss" scoped>

</style>